<?php

namespace HuoShu;

class Validate{
    
    public function email(){
        
    }
    
    public function password($value){
        $match='/^[\\~!@#$%^&*()-_=+|{}\[\],.?\/:;\'\"\d\w]{6,16}$/';
        $v = trim($value);
        if(empty($v)){ 
            return false;
        }
        return preg_match($match,$v);
    }
    
    public function phone($phone){
        return preg_match("/^1[34578]\d{9}$/",$phone);
    }    
    
    public function username($value){
       return preg_match("/^[0-9a-zA-Z]{6,20}$/",$value);
    }
}

